const CONFIG = require('../config');

module.exports = (req, res, next) => {
  if (!CONFIG.IS_PROD) {
    res.header("Access-Control-Allow-Credentials", 'true')
    res.header("Access-Control-Allow-Origin", "*")
    res.header("Access-Control-Allow-Headers", "X-Requested-With,Content-Type")
    res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS")
    res.header("Access-Control-Expose-Headers", "Content-Type")
    res.header("X-Powered-By", ' 3.2.1')
  }
  next();
}